package java_new_project;

public class Loops {
    public static void main(String[] args) {
        int a =1;
        if(a==1){
            System.out.println("你好");
        }
        else {
            System.out.println("不好");
        }
        boolean t =true;
        if(!t){
            System.out.println("True");
        }
        else {
            System.out.println("False");
        }
        int b =20;
        if (b>10 && b<30) {
            System.out.println("b>10 <30");
        }
        //for i in range()
        for (int i = 0; i <10 ; i++) {
            System.out.println(i);
        }
        String str = "abcd";
//        for (char w : "word") {
//            System.out.println(w);
//        }
//        int[] num = {1,2,3,4,5,6,7,8,9,10};
//        int x=0;
//        for(int i=0;i<num.length;i++){
//            x+=i;
//        }
//        System.out.println(x);
        String str2 ="abcdefg";
        char[] strArr = str2.toCharArray();
        System.out.println(strArr);
        for (char s : strArr){
            System.out.println(s+" ");
        }
        String str3 ="a b c d e";
        for(int i =0;i<str3.length();i++){
            char c =str3.charAt(i);
            System.out.println(c);
        }
    }
}
